% computes if the neuron produces spike. When sum of weightedInput
% (if the sum of input from previous layer multiplied by proper
% weights is greater than threshold - if it is- function returns 1,
% otherway returns 0
function output = spikeNeuron(obj, weightedInput)
    if(sum(weightedInput) >= obj.threshold)
        output = 1; %produce spike
    else
        output = 0; %do nothing
    end
end